#include <stdio.h>

int n, count, A;

int main()
{
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
	{
		scanf("%d", &A);
		if (A > 1)
			count++;
	}
	printf("%d\n", count);

	return 0;
}